home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 2 / ETO Development Tools 2.iso / Tools - Objects / ResEdit / ResEdit 2.0b2 / Examples / PExamples / Source / ResEd.p < prev    next >
Encoding:
Text File  |  1990-04-02  |  16.5 KB  |  455 lines  |  [TEXT/MPS ]

  1. {
  2.  COPYRIGHT (C) 1984-1990 Apple Computer,Inc.
  3.  All rights reserved
  4.  
  5.     Resource editor interface unit for instances of editors and pickers. This should be
  6.     USE'd by any pascal implementation of a resource editor or picker.  The
  7.     companion file ResDisp.a.o should be linked with the pascal to build
  8.     the file for inclusion in ResEdit.
  9.     
  10.     Pickers are given a resource type and should display all of that type in 
  11.     the current resfile in a suitable format.     If the picker is given an open call 
  12.     AND there's a compatible editor, it should give birth to the Editor.  The editor
  13.     is given a handle to the resource object and it should open up an edit
  14.     window for the user.
  15.  
  16.     Note that anybody can open pickers and editors so, for instance, a dialog item list
  17.     editor might open an icon Picker for the user to choose an appropriate icon.
  18.     The user could also, while in the icon picker, open the icon editor to create
  19.     a new icon if desired. }
  20.  
  21.  
  22. UNIT ResEd;
  23.  
  24.  
  25. INTERFACE
  26.  
  27. Uses    Memtypes, QuickDraw, OSIntf, ToolIntf, Printing;
  28.  
  29.  
  30. CONST
  31.  
  32.     { Standard menus exported by ResEdit }
  33.  
  34.     fileMenu    = 2;
  35.  
  36.     newFileItem     = 1;
  37.     openFileItem    = 2;
  38.     openSpecialItem = 3;
  39.     closeItem       = 4;
  40.     saveItem         = 5;
  41.     revertItem        = 6;
  42.     getThisInfoItem = 8;
  43.     getInfoItem     = 9;
  44.     verifyItem        = 10;
  45.     pageSetupItem    = 12;
  46.     printItem        = 13;
  47.     preferencesItem = 15;
  48.     quitItem        = 17;
  49.     
  50.     { Masks for AbleMenu - normally not used directly. }
  51.     newFileMask        = $2;
  52.     openFileMask    = $4;
  53.     openSpecialMask    = $8;
  54.     closeMask        = $10;
  55.     saveMask        = $20;
  56.     revertMask        = $40;
  57.     getThisInfoMask = $100;
  58.     getInfoMask        = $200;
  59.     verifyMask        = $400;
  60.     pageSetupMask    = $1000;
  61.     printMask        = $2000;
  62.     preferencesMask = $08000;
  63.     quitMask        = $020000;
  64.     disabledMask    = $1;
  65.     
  66.     { Mask combinations to be used in calls to AbleMenu. }
  67.     fileNotOpen    = disabledMask + newFileMask + openFileMask + openSpecialMask + getInfoMask + 
  68.                   verifyMask + pageSetupMask + preferencesMask + quitMask;
  69.     fileNoPrint = fileNotOpen + getThisInfoMask + closeMask + saveMask + revertMask;
  70.     fileAll        = fileNoPrint + printMask;
  71.     fileDA        = disabledMask + closeMask + quitMask;
  72.  
  73.     rsrcMenu    = 128;
  74.     
  75.     rsrcCreateItem        = 1;
  76.     rsrcOpenItem        = 2;
  77.     rsrcOpenTemplateItem= 3;
  78.     rsrcOpenHexItem        = 4;
  79.     rsrcRevertItem        = 6;
  80.     rsrcGetInfoItem        = 8;
  81.     
  82.     rsrcCreateMask        = $2;
  83.     rsrcOpenMask        = $4;
  84.     rsrcOpenTemplateMask= $8;
  85.     rsrcOpenHexMask        = $10;
  86.     rsrcRevertMask        = $40;
  87.     rsrcGetInfoMask        = $100;
  88.     rsrcDisabledMask    = $FFFFFE01;
  89.     
  90.     rsrcDisabled        = $FFFFFE00;
  91.     rsrcRevertOnly        = rsrcDisabledMask + rsrcRevertMask;
  92.     rsrcPickerNoSel        = rsrcDisabledMask + rsrcCreateMask;
  93.     rsrcFilePicker        = rsrcPickerNoSel + rsrcRevertMask + rsrcOpenMask;
  94.     rsrcRsrcPicker        = rsrcFilePicker + rsrcOpenHexMask + rsrcOpenTemplateMask + rsrcGetInfoMask;
  95.     rsrcEditor            = rsrcDisabledMask + rsrcRevertMask + rsrcGetInfoMask;
  96.     rsrcEditorPicker    = rsrcEditor + rsrcOpenMask + rsrcOpenTemplateMask + rsrcOpenHexMask;
  97.     rsrcDITLEd            = rsrcEditorPicker - rsrcOpenHexMask + rsrcCreateMask;
  98.     rsrcEditorCreate    = rsrcEditor + rsrcCreateMask;
  99.     
  100.     editMenu        = 3;
  101.  
  102.     undoItem            = 1;
  103.     cutItem             = 3;
  104.     copyItem            = 4;
  105.     pasteItem           = 5;
  106.     clearItem           = 6;
  107.     dupItem             = 8;
  108.     selectAllItem        = 9;
  109.     selectChangedItem    =10;
  110.     
  111.     { Masks for AbleMenu - normally not used directly. }
  112.     undoMask        = $2;
  113.     cutMask            = $8;
  114.     editCopyMask    = $10;
  115.     pasteMask        = $20;
  116.     clearMask        = $40;
  117.     duplicateMask    = $100;
  118.     selectAllMask    = $200;
  119.     selectChangedMask=$400;
  120.     editDisabledMask= $FFFFF801;
  121.  
  122.     { Mask combinations to be used in calls to AbleMenu. }
  123.     editNone    = editDisabledMask - 1;
  124.     editClear    = editDisabledMask + clearMask;
  125.     editCopy    = editDisabledMask + editCopyMask;
  126.     editPaste    = editDisabledMask + pasteMask;
  127.     editUndoPasteOnly = editPaste + undoMask;
  128.     editDup        = editClear + duplicateMask;
  129.     editNoDup    = editDisabledMask + cutMask + editCopyMask + pasteMask + clearMask; { No dup or undo }
  130.     editNoUndo    = editNoDup + duplicateMask;
  131.     editUndNoDup= editNoDup + undoMask;
  132.     editAll        = editNoUndo + undoMask;
  133.     editAcc     = editUndNoDup;            { for DAs }
  134.     
  135.     viewMenu = 130;                        { Type pickers view menu. }
  136.     
  137.     viewByIDItem            = 1;
  138.     viewByNameItem            = 2;
  139.     viewBySizeItem            = 3;
  140.     viewByOrderItem            = 4;
  141.     viewBySpecialItem        = 5;
  142.     viewShowAttributesItem    = 7;
  143.     
  144.     { Masks for AbleMenu. }
  145.     viewByIDMask            = $2;
  146.     viewByNameMask            = $4;
  147.     viewBySizeMask            = $8;
  148.     viewByOrderMask            = $10;
  149.     viewBySpecialMask        = $20;
  150.     viewShowAttributesMask    = $80;
  151.     viewDisabledMask        = $FFFFFF01;
  152.     
  153.     viewNoSpecial            = viewDisabledMask + viewByIDMask + viewByNameMask + viewBySizeMask + viewByOrderMask + viewShowAttributesMask;
  154.     viewNoAttributes        = viewDisabledMask + viewByIDMask + viewByNameMask + viewBySizeMask + viewByOrderMask + viewBySpecialMask;
  155.     viewAll                    = viewNoAttributes + viewShowAttributesMask;
  156.  
  157.     editorNameChr     = CHR(0);        { First char of the name for editors }
  158.     
  159.     { Standard strings available by calling GetStr. }
  160.     editStrings        = 130;            { Resource ID of STR# resource containing the strings. }
  161.     undoChangeStr    = 1;
  162.     redoChangeStr    = 2;
  163.     undoCutStr        = 3;
  164.     redoCutStr        = 4;
  165.     undoCopyStr        = 5;
  166.     redoCopyStr        = 6;
  167.     undoClearStr    = 7;
  168.     redoClearStr    = 8;
  169.     undoTypingStr    = 9;
  170.     redoTypingStr    = 10;
  171.     undoPasteStr    = 11;
  172.     redoPasteStr    = 12;
  173.     undoStr            = 13;
  174.     
  175.     miscStrings            = 129;        { Resource ID of STR# resource containing the strings. }
  176.     miscStringsName        = 'Misc';    { Accessing resources by name is preferred }
  177.     fromStr                = 1;        { String for window titles. }
  178.     cantLoadSndErrStr    = 24;        { Snd picker string. }
  179.     fullWindowStr         = 38;        { String for the resizeWind menu item }
  180.     ownerWindowWindowStr= 39;
  181.     newItemStr             = 40;        { Enter new item number }
  182.     selectItemStr         = 41;        { Open which item? }
  183.     clipBoardErrorStr    = 42;        { Error accessing the Clipboard. } 
  184.     sndErrorStr            = 43;        { Error playing a sound. }
  185.     openUsingStr        = 44;        { Open using Template… }
  186.     openAsDITMStr        = 45;        { Open As Dialog Item }
  187.     openDITMStr            = 77;        { Open Item }
  188.  
  189.     { Text for selected errors }
  190.     errorStrings        = 132;        { Resource ID of STR# resource containing the error strings }
  191.     errorStringsName    = 'Errors';    { Accessing resources by name is preferred }
  192.     genericErrStr            = 1;    { Returned by GetErrorText when no specific message available }
  193.     ioErrStr                = 1;
  194.     writeProtectErrStr        = 2;
  195.     diskFullErrStr            = 3;
  196.     fileLockedErrStr        = 4;
  197.     outOfMemoryErrStr        = 5;
  198.     alreadyOpenErrStr        = 6;
  199.     tooManyOpenErrStr        = 7;
  200.     volNotMountedErrStr        = 8;
  201.     resNotFoundErrStr        = 9;
  202.     accessErrStr            = 10;
  203.     resFileNotFoundErrStr    = 11;
  204.     addResFailErrStr        = 12;
  205.     removeResFailErrStr        = 13;
  206.     resAttributesErrStr        = 14;
  207.     resMapErrStr            = 15;    
  208.     fileNotFoundErrStr        = 16;
  209.     eofErrStr                = 17;
  210.  
  211.     arrowCursor         = -1;        { Used in the call to SetTheCursor to set the arrow cursor. }
  212.     
  213.     minPickStdWidth     = 150;
  214.     minPickStdHeight     = 64;
  215.  
  216.     theScrollBar        = 15;        { Width of a scroll bar. }
  217.     pickerGaps             = 6;        { 4 bet graphic & frame, 2 for frame }
  218.     
  219.     okChoice = 1;
  220.     
  221.     noDialog = 0;
  222.     
  223.     alertStringsName = 'Alert strings';
  224.     badCharAlert = 1;                { ALRT, DLOG, WIND editors }
  225.     revertResourceAlertStr = 2;
  226.     noTemplateAlert = 6;            { GNRL editor }
  227.     cantPlayOnThisMachineAlert = 7;    { snd picker }
  228.     cantPlaySndAlert = 8;            { snd picker }
  229.  
  230.     { Consts for Resource menu string }
  231.     rsrcStrName = 'Resource menu';
  232.     rsrcCreateStr = 1;
  233.     rsrcOpenStr = 2;
  234.     rsrcListStr = 3;
  235.     rsrcOpenLists = 4;
  236.     rsrcOpenEditor = 5;
  237.     rsrcOpenEditors = 6;
  238.     rsrcOpenHex = 7;
  239.     rsrcRevert = 8;
  240.     rsrcRevertThese = 9;
  241.     rsrcResources = 10;
  242.     rsrcRevertRes = 11;
  243.     rsrcRevertThis = 12;
  244.     rsrcPatCreateStr = 13;
  245.     rsrcSICNCreateStr = 14;
  246.     rsrcDITLCreateStr = 15;
  247.     rsrcRevertItemStr = 16;
  248.     rsrcGNRLCreateStr = 17;
  249.     
  250. TYPE
  251.     STR64 = STRING[64];
  252.  
  253.     AlertType = (displayTheAlert, displayStopAlert, displayNoteAlert, displayCautionAlert, 
  254.                  displayYNAlert, displayYNCAlert, displayYNCStopAlert);
  255.  
  256.     { Map entry definition for new resource manager calls. }
  257.     ResMapEntry = RECORD
  258.         RID: INTEGER;
  259.         RNameOff: INTEGER;
  260.         RLocn: LongInt;
  261.         RHndl: Handle;
  262.     END;{ ResMapEntry }
  263.  
  264.     { This structure is used by the GetQuickDrawVars procedure. }
  265.     pQuickDrawVars = ^QuickDrawVars;
  266.     QuickDrawVArs = RECORD
  267.         randSeed:     LONGINT;
  268.         screenBits: BitMap;
  269.         arrow:         Cursor;
  270.         dkGray:     Pattern;
  271.         ltGray:     Pattern;
  272.         gray:         Pattern;
  273.         black:         Pattern;
  274.         white:         Pattern;
  275.         thePort:     GrafPtr;
  276.     END; { QuickDrawVars }
  277.         
  278.  
  279.     {    Each driver has its own object handle. This has to start with a handle
  280.         to its parent's object followed by the name distinguishing the father
  281.         This name will be part of the son's window title. The next field should
  282.         be the window of the obj (may be used by son to get back to the father
  283.         (through the refcon in the windowRec). The next field is the rebuild flag
  284.         used to indicate that a windows data (e.g. a pickers list) needs to be
  285.         recalculated at the next opportunity.  The rest of the handle can be of
  286.         any format.  The name for pickers should be the name of the file or disk.
  287.         For editors, the name should be the complete name (not the windows title)
  288.         preceded by an editorNameChr character (see const above).  An example of a
  289.         complete name would be "ALRT ID = -1234 from AFile".  This name is used to
  290.         uniquely identify a window.  
  291.         
  292.         See the manual for detailed documentation of this interface file. }
  293.  
  294.     ParentPtr = ^ParentRec;
  295.     ParentHandle = ^ParentPtr;
  296.  
  297.     ParentRec = RECORD
  298.       father: ParentHandle;
  299.       name: str255;
  300.       wind: WindowPeek;
  301.       rebuild: BOOLEAN;            { Flag set by son to indicate that world }
  302.                                 { has changed so father should rebuild list }
  303.     END;
  304.  
  305.     { Standard picker record }
  306.  
  307.     PickPtr = ^PickRec;                { Any type is OK here }
  308.     PickHandle = ^PickPtr;
  309.  
  310.     ViewTypes = (viewById, viewByName, viewBySize, viewByOrder, viewBySpecial);
  311.     PickRec = RECORD
  312.         father:     ParentHandle;        { Back ptr to dad }
  313.         fName:         STR255;
  314.         wind:         WindowPtr;            { Directory window }
  315.         rebuild:     BOOLEAN;
  316.         pickID:     INTEGER;            { ID of this picker }
  317.         rType:         ResType;            { Type for picker }
  318.         rNum:         INTEGER;            { Resfile number }
  319.         rSize:         LONGINT;            { Size of a null resource }
  320.         nInsts:     INTEGER;            { Number of instances }
  321.         instances:    ListHandle;            { List of instances }
  322.         drawProc:    Ptr;                { List draw proc }
  323.         scroll:        ControlHandle;        { Scroll bar }
  324.         viewBy:        ViewTypes;            { Current view type }
  325.         ldefType:    ResType;            { Which LDEF to use }
  326.         theViewMenu:MenuHandle;            { The picker view menu }
  327.         showAttributes: BOOLEAN;        { Show attrs in window?    }
  328.         viewMenuMask: LONGINT;            { Which items are enabled? }
  329.         cellSize:    Cell;                { Cell size for special view. }
  330.     END;
  331.  
  332. { These routines are used to start pickers and editors. }
  333.  
  334.     PROCEDURE GiveEBirth (resHandle: Handle; pick: PickHandle);
  335.     PROCEDURE GiveSubEBirth (resHandle: Handle; pick: PickHandle);
  336.     PROCEDURE GiveThisEBirth (resHandle: Handle; pick: PickHandle; openThisType:ResType);
  337.  
  338. { These routines are used to feed events and menu calls to the appropriate picker or editor. }
  339.     PROCEDURE CallInfoUpdate (oldID, newID: INTEGER; refcon: LONGINT; id: INTEGER );
  340.     PROCEDURE PassMenu (menu, item: INTEGER; father: ParentHandle);
  341.  
  342.  
  343. { Window Utilities }
  344.  
  345.     FUNCTION  AlreadyOpen (VAR windowTitle, windowName: STR255; father: ParentHandle): BOOLEAN;
  346.     FUNCTION  PickerWindSetup(color: BOOLEAN; width, height: INTEGER; VAR windowTitle: STR255;
  347.                               windowKind: INTEGER; dad: ParentHandle): WindowPtr;
  348.     FUNCTION  EditorWindSetup (dlogID: INTEGER; color: BOOLEAN; width, height: INTEGER; 
  349.                                VAR windowTitle, windowName: STR255; addFrom: BOOLEAN; 
  350.                                windowKind: INTEGER; father: ParentHandle): WindowPtr;
  351.     PROCEDURE GetWindowTitle (VAR windowTitle, windowName: STR255; addFrom: BOOLEAN; father: ParentHandle);
  352.     PROCEDURE SetETitle (h: Handle; VAR str: STR255);
  353.     FUNCTION  WindAlloc: WindowPtr;
  354.     PROCEDURE WindReturn (w: WindowPtr);
  355.     FUNCTION  WindList (w: WindowPtr; nAcross: INTEGER; cSize: Point; drawProc:INTEGER): ListHandle;
  356.     PROCEDURE WindOrigin (w: WindowPtr; dad: ParentHandle);
  357.  
  358. { Extended Resource Manager }
  359.  
  360.     FUNCTION  CurrentRes: INTEGER;
  361.     FUNCTION  Get1Index (t: ResType; index: INTEGER): Handle;
  362.     FUNCTION  Get1Res (t: ResType; id: INTEGER): Handle;
  363.     FUNCTION  ResEditGet1Resource (theType: ResType; ID: INTEGER; VAR wasLoaded: BOOLEAN; VAR error: INTEGER): Handle;
  364.     FUNCTION  NeedToRevert (myWindow: WindowPtr; theRes: Handle): BOOLEAN;
  365.     PROCEDURE RemoveResource (theRes: Handle);
  366.     FUNCTION  RevertThisResource (theObj: ParentHandle; res: Handle): BOOLEAN;
  367.     FUNCTION  RestoreRemovedResources (pick: PickHandle): BOOLEAN;
  368.     PROCEDURE ResourceIDHasChanged (theObj: ParentHandle; theType: ResType; theOldId, theNewId: INTEGER);
  369.     FUNCTION  SysResFile: INTEGER;
  370.     FUNCTION  BeautifulUnique1ID (t: ResType): INTEGER;
  371.  
  372. { Miscellaneous utilities }
  373.     
  374.     PROCEDURE Abort;
  375.     PROCEDURE AbleMenu(menu: INTEGER; enable: LONGINT);
  376.     FUNCTION  AddNewRes (hNew: Handle; t: ResType; idNew: INTEGER; s: str255): BOOLEAN;
  377.     PROCEDURE BubbleUp (h: Handle);
  378.     FUNCTION  BuildType (t: ResType; l: ListHandle): INTEGER;
  379.     FUNCTION  CheckError (err, msgID: INTEGER): BOOLEAN;
  380.     FUNCTION  CloseNoSave: BOOLEAN; 
  381.     PROCEDURE ConcatStr (VAR str1: STR255; str2: STR255);
  382.     FUNCTION  DefaultListCellSize:INTEGER;         
  383.     PROCEDURE CenterDialog (theType: ResType; dialog: INTEGER);
  384.     FUNCTION  DisplaySTRAlert(which: AlertType; STRName: STR255; STRIndex: INTEGER): BOOLEAN;
  385.     FUNCTION  DisplayAlert (which: AlertType; id: INTEGER): INTEGER;
  386.     FUNCTION  DoPickBirth(color: BOOLEAN; buildList: BOOLEAN; wWidth, wHeight, columns: INTEGER; 
  387.                           pickerResId: INTEGER; pick: PickHandle): BOOLEAN;
  388.  
  389.     {    The drawProc is of the form: PROCEDURE DrawResource (lRect: Rect; theRes: Handle);        }
  390.     PROCEDURE DrawLDEF (message: INTEGER; lSelect: BOOLEAN; lRect: Rect; theRes: Handle;
  391.                         id: INTEGER; title: STR255; maxH, maxV: INTEGER;
  392.                         DrawResource: ProcPtr; lh: ListHandle);
  393.     PROCEDURE DrawMBarLater (forceItNow: BOOLEAN);
  394.     FUNCTION  FindOwnerWindow (theRes: Handle): WindowPeek;
  395.     PROCEDURE FixHand (s: LONGINT; h: Handle);
  396.     PROCEDURE FlashDialogItem (dp: DialogPtr; item: integer);
  397.     PROCEDURE FrameDialogItem (dp: DialogPtr; item: integer);
  398.     FUNCTION  GetQuickDrawVars: pQuickDrawVars;
  399.     PROCEDURE GetStr (num, list: INTEGER; VAR str: STR255);
  400.     PROCEDURE GetNamedStr(index: INTEGER; name: STR255; VAR str: STR255);
  401.     PROCEDURE GrowMyWindow (minWidth, minHeight: INTEGER; windPtr: WindowPtr; lh: ListHandle);
  402.     FUNCTION  HandleCheck (h: Handle; msgID: INTEGER): BOOLEAN;
  403.     PROCEDURE MetaKeys (VAR cmd, shift, opt: BOOLEAN);
  404.     FUNCTION  NewRes (s: LONGINT; t: ResType; l: ListHandle; VAR n: INTEGER): Handle;
  405.     PROCEDURE PickEvent (VAR evt: EventRecord; pick: PickHandle);
  406.     PROCEDURE PickInfoUp (oldID, newID: INTEGER; pick: PickHandle);
  407.     PROCEDURE PickMenu (tossOnClose: BOOLEAN; menu, item: INTEGER; pick: PickHandle);
  408.     FUNCTION  PickStdHeight: INTEGER;
  409.     FUNCTION  PickStdWidth: INTEGER;
  410.     FUNCTION  PrintSetup: Handle;        { Return type is actually THPrint }
  411.     PROCEDURE PrintWindow (toPrint: PicHandle);
  412.     FUNCTION  ResEdID: INTEGER;
  413.     PROCEDURE SendRebuildToPicker (theType: ResType; parent: ParentHandle);
  414.     PROCEDURE SendRebuildToPickerAndFile (theType: ResType; parent: ParentHandle) ;
  415.     PROCEDURE SetResChanged (h: Handle);
  416.     PROCEDURE SetTheCursor (whichCursor: INTEGER);
  417.     PROCEDURE ShowInfo (h:Handle; father: ParentHandle);
  418.     PROCEDURE TypeToString (t: ResType; VAR s: Str255);
  419.     PROCEDURE UseAppRes;
  420.     FUNCTION  WasAborted: BOOLEAN;
  421.     FUNCTION  WasItLoaded: BOOLEAN;
  422.     FUNCTION  ColorAvailable: BOOLEAN;
  423.     
  424. { Color Palette Popup Menus }
  425.  
  426.     PROCEDURE InstallColorPalettePopup( whichWindow: WindowPtr; CQDishere, isActive: Boolean );
  427.     PROCEDURE DrawColorPopup( whichWindow: WindowPtr; itemBox: Rect;
  428.                               whichColor: RGBColor; CQDishere: Boolean );
  429.     FUNCTION ColorPalettePopupSelect( whichWindow: WindowPtr; itemBox: Rect;
  430.                                       VAR whichColor: RGBColor; CQDishere: Boolean ): Boolean;
  431.     PROCEDURE DeinstallColorPalettePopup( whichWindow: WindowPtr; CQDishere: Boolean );
  432.     
  433. { Routines that are used internally withing ResEdit and may be useful in other
  434.     circumstances. }
  435.  
  436.     FUNCTION  MapResourceType (editor: BOOLEAN; theRes: Handle; origResType: ResType): ResType;
  437.     PROCEDURE DoKeyScan (var evt: EventRecord; offset: integer; lh: ListHandle);
  438.     FUNCTION  DupPick (h: Handle; c: cell; pick: PickHandle): Handle;
  439.     FUNCTION  GetType (templatesOnly: BOOLEAN; VAR s: STR255): BOOLEAN;
  440.     PROCEDURE KillCache;
  441.     PROCEDURE MyCalcMask (srcPtr,dstPtr: Ptr; srcRow,dstRow,height,words: INTEGER);
  442.     FUNCTION  ResEditRes: INTEGER;
  443.         Inline    { move.w    CurApRefNum,(sp) } $3eB8, $0900;
  444.     PROCEDURE ScrapCopy ( VAR h: Handle );
  445.     PROCEDURE ScrapEmpty;
  446.     PROCEDURE ScrapPaste(pasteAll: BOOLEAN; typeToPaste: ResType; resFile: INTEGER);
  447.     PROCEDURE WritePreferences (prefType: ResType; prefId: INTEGER; prefName: STR255; prefHandle: Handle);
  448.     PROCEDURE GetErrorText (error: INTEGER; VAR errorText: STR255);
  449.     FUNCTION  PlaySyncSound(which: INTEGER; sndHandle: Handle): BOOLEAN;
  450.     
  451. END.
  452.  
  453.  
  454.  
  455.